import 'package:fluro/fluro.dart';
import './route_handlers.dart';

class ShopRouter {
  static FluroRouter? _router = null;
  static get navigateTo => _router!.navigateTo;
  static get generator => _router!.generator;
  static init() {
    _router = FluroRouter();
    _define();
  }

  static void destory() {
    _router = null;
  }

  static void _define() {
    _router!.notFoundHandler = notFoundHandler;
    _router!.define("/",
        handler: rootHandler, transitionType: TransitionType.inFromRight);
    _router!.define("/search",
        handler: searchHandler, transitionType: TransitionType.inFromRight);
    _router!.define("/webview",
        handler: webViewHandler, transitionType: TransitionType.inFromRight);
  }
}
